package com.japancompany.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.japancompany.entity.Article;
import com.japancompany.common.PageQuery;
import com.japancompany.common.PageResult;

import java.util.List;

public interface ArticleService extends IService<Article> {
    
    PageResult<Article> getArticlePage(PageQuery pageQuery, String title, Long categoryId, Integer status);
    
    Article getArticleDetail(Long id);
    
    boolean createArticle(Article article);
    
    boolean updateArticle(Article article);
    
    boolean deleteArticle(Long id);
    
    boolean updateArticleStatus(Long id, Integer status);
    
    boolean incrementViewCount(Long id);
    
    boolean incrementLikeCount(Long id);
    
    List<Article> getLatestArticles();
    
    List<Article> getRecommendArticles();
    
    List<Article> getTopArticles();
}